package com.coderlin1.service;

import com.coderlin1.entities.Customer;

import java.util.List;

/**
 * <Description> <br>
 *
 * @author Coder_Lin<br>
 * @version 1.0<br>
 * @taskId: <br>
 * @createDate 2021/07/30 9:47 <br>
 * @see com.coderlin1.service <br>
 */
public interface CustomerService {

    /**
     * 列出所有的customer
     * @return
     */
    List<Customer> listCustomer();

    /**
     * 添加用户
     * @param custName
     * @param custMobile
     * @param custAddress
     * @param custTicket
     * @return
     */
    Integer addCustomer(String custName, String custMobile, String custAddress, Integer custTicket);

    /**
     * 根据输入的文本进行模糊查询
     * @param custName
     * @return
     */
    List<Customer> searchCustomerByName(String custName);

    /**
     * 根据id查询出用户信息
     * @param cid
     * @return
     */
    Customer listCustomerById(Integer cid);

    /**
     * 修改用户信息，并对controller层转发的数据进行封装
     * @param cid
     * @param custName
     * @param custMobile
     * @param custAddress
     * @param custTicket
     * @return
     */
    Integer modCustomer(Integer cid,String custName, String custMobile, String custAddress, Integer custTicket);

    /**
     * 根据id删除客户信息
     * @param cid
     * @return
     */
    Integer delCustomer(Integer cid);
}
